package retrofit.boot.client;

import retrofit.client.*;

import java.io.*;
import java.lang.reflect.Method;

/**
 * Created by wulg on 2019/10/21
 * description:Retrofit-Client实现类
 */
public class RetrofitSmartClient implements Client {

    private final IRetrofitClient<RequestWrapper, Response> client;

    private final RequestWrapper.Options options;

    public RetrofitSmartClient(IRetrofitClient<RequestWrapper, Response> client, RequestWrapper.Options options) {
        this.client = client;
        this.options = options;
    }

    @Override
    public Response execute(Request request) throws IOException {
        return client.execute(new RequestWrapper(request,options));
    }
}
